package com.deer.remote.server.rds.controller;

import com.deer.remote.common.protocol.Message;
import com.deer.remote.server.rds.BaseMessageController;
import com.deer.remote.server.rds.TentacleDesktopSession;

/**
 * Created by matrixy on 2019/1/13.
 */
public class UploadFileResponseController extends BaseMessageController {
	@Override
	public boolean authenticateRequired() {
		return true;
	}

	@Override
	public Message service(TentacleDesktopSession session, Message msg) throws Exception {
		byte result = msg.getBodyBytes()[0];
		if (result != 0x00)
			throw new RuntimeException(String.format("upload file failed: %x", result));
		return null;
	}
}
